<?php
/**
 * User:chendenan
 * Created On 2022/3/21 0021 17:20
 */
namespace app\api\controller\mall;
use app\api\controller\ApiBase;
use app\common\lib\Show as ShowLib;
use app\common\business\Goods as GoodsBus;
class Detail extends ApiBase{
    public function index(){
        $id = input("param.id",0,"intval");
        if(!$id){
            return ShowLib::error();
        }
        $result = (new GoodsBus())->getGoodsDetailBySkuId($id);
        if(!$result){
            return ShowLib::error();
        }
        return ShowLib::success($result);
    }
}